﻿using SSC.ViewModels;
using SSC.Views;
using System.Windows;

namespace SSC
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            DataContext = new MainViewModel();
        }

        private void LoginMenuItem_Click(object sender, RoutedEventArgs e)
        {
            // 实例化并显示登录窗体
            var loginWindow = new Views.wdLogin();
            loginWindow.ShowDialog();
        }

        private void UserManagementMenuItem_Click(object sender, RoutedEventArgs e)
        {
            // 加载 用户管理 到 ContentArea
            ContentArea.Content = new ucUser();
        }

        private void PartMenuItem_Click(object sender, RoutedEventArgs e)
        {
            var partWindow = new Views.wdPart();
            partWindow.ShowDialog();
        }

        private void DataMonitor_Click(object sender, RoutedEventArgs e)
        {
            ContentArea.Content = new ucDataMonitor();
        }
    }
}